package com.sdy.dcsb.web.util;

import javax.servlet.http.HttpServletRequest;

/**
 * @author: Lx
 */
public class SearchBrowserKeywordsUtil {
    /**
     * 是否是微软浏览器的关键字
     */
    private static String[] IEBrowserSignals = {"MSIE", "Trident", "Edge"};

    /**
     * @param request 判断是否是IE浏览器
     * @return
     */
    public static boolean isMSBrowser(HttpServletRequest request) {
        String userAgent = request.getHeader("User-Agent");
        for (String signal : IEBrowserSignals) {
            if (userAgent.contains(signal)){
                return true;
            }
        }
        return false;
    }

}
